﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataLayer.Controller;
using DataLayer.dbml;
using SForceOTService;


public partial class provider_OrderDetail : cGlobal
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ORDEN_TRABAJO OT = OTController.GetByIdSDFC(Request.Params["OT"]);
            lblTypeOT.Text = OT.TIPO_OT;
            lblStatus.Text = OT.ESTADO;
            lblDate.Text = DateTime.Parse(OT.FECHA.ToString()).ToString(formatDate); ;
            lblCPA.Text = OT.CPA;
            lblCodeOT.Text = OT.CODIGO_ORDEN;
            lblVersion.Text = OT.VERSION;
            lblService.Text = OT.NOMBRE_SERVICIO;

            lblName.Text = OT.RAZON_SOCIAL;
            lblPhone.Text = OT.TELEFONO;
            lblCity.Text = OT.CIUDAD;
            lblContact.Text = OT.CONTACTO;
            lblTypeClient.Text = OT.TIPO_CLIENTE;
            lblAddress.Text = OT.DIRECCION;
            lblBranch.Text = OT.SEDE;
            lblMobile.Text = OT.CELULAR;

            lblObservation.Text = OT.OBSERVACIONES;
            lblWorks.Text = OT.TRABAJOS;
            lblCase.Text = OT.CASO;
            lblTecnology.Text = OT.TECNOLOGIA;

            //if (OT.ESTADO == "Pendiente")
            //    OTController.SetStatus(OT.ID_OT_SDFC,"En Proceso");

        }

    }

    protected void btnLoad_Click(object sender, ImageClickEventArgs e)
    {
        //OTController.SetStatus(lblIdSDFC.Text, "Cerrado");
        jsCloseShadowBox(Page, "ordeniframe","OrderWork.aspx");
    }
}
